﻿using Abp.Domain.Entities;
using Batman.Jianbei.Forum.Core.Domains.Users;
using System;

namespace Batman.Jianbei.Forum.Core.Domains.Posts
{
    /// <summary>
    /// 帖子评论表
    /// </summary>
    public class PostComment : Entity<string>
    {
        public PostComment() { }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="wxUId">评论用户</param>
        public PostComment(string wxUId)
        {
            this.CreateAt = DateTime.Now;
            this.WxUId = wxUId;
        }

        /// <summary>
        /// 评论内容
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// 帖子ID
        /// </summary>
        public string PostId { get; set; }

        /// <summary>
        /// 评论用户id
        /// </summary>
        public string WxUId { get; set; }

        public WeixinUser WxUser { get; set; }

        /// <summary>
        /// 回复ID（相当于ParentID）
        /// </summary>
        public string ReplyId { get; set; }

        /// <summary>
        /// 初始回复ID
        /// </summary>
        public string ReplyRootId { get; set; }

        /// <summary>
        /// 评论时间
        /// </summary>
        public DateTime CreateAt { get; set; }

        /// <summary>
        /// 软删除标识
        /// </summary>
        public bool IsDeleted { get; set; }
    }
}
